package cn.lili.modules.grab.dingdong.config;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

@Component
@Data
@RefreshScope
public class DingdongConfig {

    @ApiModelProperty("请求token（申请分配）")
    @Value("${dingdong.token:6FEB39A344BE030B357362B55B0888E6}")
    private String token;

    @ApiModelProperty("用户app_key由供应方提供")
    @Value("${dingdong.app_key:d64c6b94-f70a-4dd7-9791-963aa54e49d5}")
    private String app_key;

    @ApiModelProperty("公钥")
    @Value("${dingdong.public_key:MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDbXV+2TIBIaRDopdtdWoU9MD7rTqZ8toEw9dYWgNQ+fd22IKbXbaQpQVMQwdQ56DxtSyOvlBmBupXYPc+48fl0/1SGEYf9RShgUE4NrsYvsqEAd3Y1r/HoIltHwjgimsGn8zcXuH6daUl+WcwPjGRPZ+oUPcd8zXnCRH+Gf26RrwIDAQAB}")
    public String public_key;

    /****************************商品接口******************************/

    @ApiModelProperty("商品列表URL")
    @Value("${dingdong.goods_list_url:http://tintegral.7dingdong.com/api/api_goods/goodsList}")
    public String goodsListUrl;

    @ApiModelProperty("商品列表URL")
    @Value("${dingdong.goods_cate_url:http://tintegral.7dingdong.com/api/api_goods/goodsCate}")
    public String goodsCateUrl;

    @ApiModelProperty("商品详情URL")
    @Value("${dingdong.detail_url:http://tintegral.7dingdong.com/api/api_goods/detail}")
    public String detailUrl;

    @ApiModelProperty("商品配送方式URL")
    @Value("${dingdong.get_yf_mode_url:http://tintegral.7dingdong.com/api/api_goods/getYfMode}")
    public String getYfModeUrl;

    @ApiModelProperty("商品品牌列表URL")
    @Value("${dingdong.get_brand_url:http://tintegral.7dingdong.com/api/api_brand/getBrand}")
    public String getBrandUrl;

    @ApiModelProperty("商品库存查询URL")
    @Value("${dingdong.get_goods_stock_url:http://tintegral.7dingdong.com/api/api_goods/getGoodsStock}")
    public String getGoodsStockUrl;

    @ApiModelProperty("新版商品列表接口（带总数）URL")
    @Value("${dingdong.goods_list_v1_url:http://tintegral.7dingdong.com/api/api_goods/goodsList_v1}")
    public String goodsListV1Url;

    @ApiModelProperty("商品库存详情")
    @Value("${dingdong.get_goods_stock_v1_url:http://tintegral.7dingdong.com/api/api_goods/getGoodsStock_v1}")
    public String getGoodsStockV1Url;

    /****************************订单接口******************************/

    @ApiModelProperty("运费计算")
    @Value("${dingdong.freight_calc_url:http://tintegral.7dingdong.com/api/api_order/freightCalc}")
    public String freightCalcUrl;

    @ApiModelProperty("创建订单")
    @Value("${dingdong.create_order_url:http://tintegral.7dingdong.com/api/api_order/createOrder}")
    public String createOrderUrl;

    @ApiModelProperty("订单详情")
    @Value("${dingdong.get_order_info:http://tintegral.7dingdong.com/api/api_order/getOrderInfo}")
    public String getOrderInfoUrl;

    /****************************辅助接口******************************/

    @ApiModelProperty("地址查询")
    @Value("${dingdong.area_url:http://tintegral.7dingdong.com/api/api_aux/area}")
    public String areaUrl;

    @ApiModelProperty("获取全部省市区")
    @Value("${dingdong.region_all_url:http://tintegral.7dingdong.com/api/api_aux/regionAll}")
    public String regionAllUrl;

    /****************************售后服务******************************/

    @ApiModelProperty("售后服务列表")
    @Value("${dingdong.service_list_url:http://tintegral.7dingdong.com/api/api_refund/serviceList}")
    public String serviceListUrl;

    @ApiModelProperty("获取全部省市区")
    @Value("${dingdong.service_type_list_url:http://tintegral.7dingdong.com/api/api_refund/serviceTypeList}")
    public String serviceTypeListUrl;

    @ApiModelProperty("创建售后服务")
    @Value("${dingdong.create_service_url:http://tintegral.7dingdong.com/api/api_refund/createService}")
    public String createServiceUrl;

    @ApiModelProperty("售后服务详情")
    @Value("${dingdong.service_detail_url:http://tintegral.7dingdong.com/api/api_refund/serviceDetail}")
    public String serviceDetailUrl;

    @ApiModelProperty("取消售后服务")
    @Value("${dingdong.service_cancel_url:http://tintegral.7dingdong.com/api/api_refund/serviceCancel}")
    public String serviceCancelUrl;

    @ApiModelProperty("上传售后图片")
    @Value("${dingdong.upload_resource_url:http://tintegral.7dingdong.com/api/api_refund/uploadResource}")
    public String uploadResourceUrl;

    @ApiModelProperty("售后申请单详情")
    @Value("${dingdong.get_order_refund_info_url:http://tintegral.7dingdong.com/api/api_refund/getOrderRefundInfo}")
    public String getOrderRefundInfoUrl;

    /****************************回调接口******************************/

    @ApiModelProperty("订单回调")
    @Value("${dingdong.freight_calc_url:http://localhost:8080/}")
    public String callbackOrder;
}
